Technical Field
The present invention relates generally to real time computer image generation systems, and, more particularly, to means and method for texture map filtering.
Description of the Related Art
In computer image generation systems, texture mapping may be used to achieve realistic image reproduction for objects or features to be displayed. Texture mapping is a technique that applies an image to an object's surface. The general benefit provided by the application of texture mapping is to add realism. Many methods have been employed to accomplish texture mapping. Irrespective of which method one selects, when a texture map is created it will have a certain number of cells in the matrix. The number of cells in the matrix (e.g. 256.times.256), is the resolution of the texture map. The resolution represents the object at a certain predetermined apparent distance which is known as a level of detail. This "apparent distance" is a function of the size of the field of view, the distance of the viewer to the object and the orientation of the object. As an object moves in relative distance from the viewer a problem occurs in determining the texture color value in that it becomes computationally burdensome to include all of the cells in the texture map that contribute to the individual pixels within the object to be textured. The solution is to store a sequence of texture maps of the same texture pattern to be used at different relative distances from the object to the viewer. This sequence of texture maps is sometimes called a zoom pyramid. The zoom pyramid starts with a high resolution texture map and includes successive maps that are lower resolution versions of the previous map in the pyramid. The zoom pyramid effectively divides the scene to be displayed into a plurality of predetermined range intervals, where each range interval corresponds to a different respective level of detail (LOD). Creating texture maps at different relative distances from the object to the viewer is known as establishing multiple texture levels of detail (LODs). The manner in which the LODs are created is by establishing a base LOD which will be the texture map with the highest resolution, in other words the greatest number and smallest sized cells for a predetermined area. The highest resolution texture map is closest to the observer and is used for applying the texture to an object when the object is near to the viewer. Lower resolution versions are arranged to contain a respective decreasing amount of detail with correspondingly smaller number and larger sized cells for the same area. The lower resolution versions are created by filtering the cell data from the previous map and are used for applying texture as the object moves further from the viewer. In the texture mapping process, a determination must be made of which texture maps in the zoom pyramid to use based on the distance the object appears to be to the viewer or apparent distance. The LOD calculation makes this determination. The LOD calculation is based on a texture cell to pixel size comparison and selects the two consecutive texture maps that have the nearest cell to pixel size correspondence. The resolution of these two maps are of such resolution such that they bracket the object to be textured. Data from each of these two texture LOD maps is retrieved from memory. The data from each map is filtered using a 2D weighting function such as bilinear interpolation. The filtered data from these two texture LOD maps is then blended by linear interpolation depending on the location of the object between the two selected texture LODs. The LOD blending provides a smooth transition between texture LODs when the object is moving in the scene between the distances set for the two selected texture LODs. This technique of filtering in two successive maps and a linear interpolation is commonly referred to as trilinear interpolation and is described in U.S. Pat. No. 4,727,365. Retrieving data with this method has a constant associated cost of eight pixel accesses and between seven and thirteen multiplies per screen pixel.
A simpler method that is often used to save computations, is to only filter the texels in the closer LOD map, LOD N, of the zoom texture pyramid. The bilinearly filtered texture value from the closer map would require only four pixels accesses and less than one half the multiplies per pixel as trilinear interpolation. As the apparent distance to the polygon increases, the LOD map used to obtain the pixel value will jump from LOD N to LOD N+1 at some pre-established threshold distance, at which point the filtering will occur exclusively in LOD N+1. This simplified approach eliminates the step of blending between the two LOD levels, as required in trilinear interpolation. This method, however, while computationally more efficient than trilinear interpolation, produces undesirable visible artifacts for most texture maps as the apparent distance changes. As a consequence, there exists a need for a simplified, computationally inexpensive method of texture map filtering that does not produce associated undesirable visible artifacts.